using System;
using System.Collections.Generic;
using System.Text;

using NHibernate;
using NHibernate.Criterion;

using QLTDK.Entities;
using QLTDK.DataAccess.BaseDaos;
using QLTDK.DataAccess.Interfaces;

namespace QLTDK.DataAccess
{
	public class TdkLoaitudieukhienDao : BaseTdkLoaitudieukhienDao, ITdkLoaitudieukhienDao
    {
        public IList<TdkLoaitudieukhien> GetByTenLoaiTDK(System.String tenLoaiTDK)
        {
            return HibernateTemplate.ExecuteFind<TdkLoaitudieukhien>(

                delegate(ISession session)
                {
                    ICriteria criteria = session.CreateCriteria(typeof(TdkLoaitudieukhien));

                    criteria.Add(Expression.Eq("TenLoaiTDK", tenLoaiTDK));

                    return criteria.List<TdkLoaitudieukhien>();
                });
        }
	}
}